#ifndef EXTRACLASS_H
#define EXTRACLASS_H

#include "iostream";
#include "sstream";
#include "string";

using namespace std;

class ExtraClass
{
	public:
		ExtraClass(){}

	public :
		void static GetString( char * & result, char * ch1 = NULL, char * ch2 = NULL, char * ch3 = NULL, char * ch4 = NULL, char * ch5 = NULL, char * ch6 = NULL, char * ch7 = NULL, char * ch8 = NULL ) // + -
		{
			stringstream s;

			if ( ch1 )
				s << ch1;
			if ( ch2 )
				s << ch2;
			if ( ch3 )
				s << ch3;
			if ( ch4 )
				s << ch4;
			if ( ch5 )
				s << ch5;
			if ( ch6 )
				s << ch6;
			if ( ch7 )
				s << ch7;
			if ( ch8 )
				s << ch8;
			s << '\0'; // в конце 2 лишних символа.

//			cout << s.tellp();
			result = new char[ s.tellp() ];
			s.read( result, s.tellp() );
			//strncat( result, s.str(), 11 );

//			cout << "\ts = " << s.str() << "\t" << s.tellp() << "\t" << result << endl;
		}
};

#endif // EXTRACLASS_H
